﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using MethodWorx.CMS.Administration;

namespace MethodWorx.CMS.UI.Areas.Dashboard.Models
{
    public class HostedStatisticsModel
    {
        public int MaximumSpace { get; set; }
        public int MaximumUsers { get; set; }
        public int MaximumRoles { get; set; }
        public HostedApplicationUsage Usage { get; set; }

        public HostedStatisticsModel(HostedApplicationService service)
        {
            this.MaximumSpace = service.ConfigurationValues.MaximumSpace;
            this.MaximumUsers = service.ConfigurationValues.MaximumUsers;
            this.MaximumRoles = service.ConfigurationValues.MaximumRoles;
            //  get the usage from the service
            this.Usage = service.GetUsage();
        }
    }
}